package com.tang.model.v2;

import com.tang.model.domain.Member;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/9/2 20:15
 * @Desc
 * @Remarks
 */
public class MemberService {
    private Handler handler;

    public MemberService() {
        Handler.Builder builder = new Handler.Builder();
        builder.addHandler(new CheckHandler()).addHandler(new LoginHandler()).addHandler(new AuthHandler());
        handler = builder.builder();
    }

    public void login(String username, String password) {
        Member member = new Member(username, password);
        handler.exec(member);
    }
}
